﻿CREATE TABLE [dbo].[UserAccount] (

	[Id] [dbo].[Id] NOT NULL  IDENTITY(1000000000, 1), 
    [Name] [dbo].[Name] NOT NULL, 
    [Description] [dbo].[Description] NOT NULL, 

    [SecurityAuthorityId] [dbo].[Id] NOT NULL, 
    [DistinguishedName] [dbo].[Description] NOT NULL,
	[DisplayName] [dbo].[Name] NOT NULL,
	
    [LastLogin] DATETIME NULL, 

    [CreateId] [dbo].[Name] NOT NULL, 
    [CreateDateTime] [dbo].[CreateModifiedDateTime] NOT NULL, 
    [ModifiedId] [dbo].[Name] NOT NULL, 
    [ModifiedDateTime] [dbo].[CreateModifiedDateTime] NOT NULL, 

    CONSTRAINT [PK_UserAccount] PRIMARY KEY (Id), 
    CONSTRAINT [AK_UserAccount_Name] UNIQUE (Name), 
    CONSTRAINT [FK_UserAccount_SecurityAuthority_SecurityAuthorityId] FOREIGN KEY ([SecurityAuthorityId]) REFERENCES [SecurityAuthority](Id)
	
	
)
